package com.platform.core.web.controller;


import com.platform.core.service.SysDepartService;
import com.platform.comm.web.results.JsonResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * Description: 系统初始化接口
 **/
@RestController
@RequestMapping("management/init")
public class SysInitController {
    private final SysDepartService sysDepartService;

    public SysInitController(SysDepartService sysDepartService) {
        this.sysDepartService = sysDepartService;
    }

    @PostMapping(name = "初始化统一社会信用代码映射行政区划代码", path = "unifiedCodeRegionId")
    public JsonResult unifiedCodeRegionId(@RequestBody Map<String, String> map) {
        sysDepartService.unifiedCodeRegionId();
        return JsonResult.success();
    }
}
